package com.winter.main.mapper.read.system;

import com.winter.main.model.entity.SysUser;
import com.winter.main.utils.MyMapper;
import org.apache.ibatis.annotations.Select;

/**
 * Desc: userMapper
 * Author: dushuang
 * Date: Create in 2018/4/18
 */
public interface ReadSysUserMapper extends MyMapper<SysUser> {

    @Select({"<script>" ,
            "SELECT ",
            "id,",
            "login_name AS loginName,",
            "real_name AS realName,",
            "password,sex,email,phone,status,",
            "create_time AS createTime,",
            "update_time AS updateTime,",
            "collector_status AS collectorStatus,",
            "invite_code AS inviteCode,",
            "qr_code_url AS qrCodeUrl",
            "FROM sys_user ",
            "WHERE login_name = #{username} ",
            "</script>"})
    SysUser findByUsername(String username);
}
